<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="jpath" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>添加用户</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"/>
		<script type="text/javascript">
			window.jQuery || document.write("<script src='${jpath}/static/assets/js/jquery-2.0.3.min.js'>"+"<"+"script>");
		</script>
		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='${jpath}/static/assets/js/jquery.mobile.custom.min.js'>"+"<"+"script>");
		</script>
		<script src="${jpath}/static/assets/js/jquery.mobile.custom.min.js"></script>
		<!-- basic styles -->
		<link href="${jpath}/static/assets/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="${jpath}/static/assets/css/font-awesome.min.css" />

		<link rel="stylesheet" href="${jpath}/static/assets/css/ace.min.css" />
		<link rel="stylesheet" href="${jpath}/static/assets/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="${jpath}/static/assets/css/ace-skins.min.css" />
		<link rel="stylesheet" href="${jpath}/static/plugins/webuploader/css/webuploader.css" />
		<link rel="stylesheet" href="${jpath}/static/plugins/webuploader/style.css" />

	
		<script src="${jpath}/static/assets/js/ace-extra.min.js"></script>
	    <script src="${jpath}/static/plugins/webuploader/dist/webuploader.js"></script>
    	<script src="${jpath}/static/plugins/webuploader/upload.js"></script>
    	<script src="${jpath}/js/system_plugins.js"></script>
		<script type="text/javascript">
		//method="post" action="${jpath}/student/manager/add"
		var  jpath="${jpath}";
	function getForm(_form){
		var dataJson = "";
				var dataArr = [];
				$(_form).find("input").each(function(index,_this){
					var iptName = $(_this).attr("name");
					if(iptName != "" && iptName != null){
						dataArr.push(iptName+":'"+$(_this).val()+"'");
						dataJson+=",";
					}
				});
				dataJson ="{"+ dataArr.join(",")+"}";
				var jsonForms = eval('('+ dataJson +')');
				return jsonForms;
	}
		$(function(){
		var colM=[
					{
						name:'yonghuxingming'
					},
					{
						name:'fujianmingcheng'
					},
					{
						name:'shangchuanshijian'
					},{
						name:'id',
						cl:function(index,val){
							var data="<div class='btn-group'>";
							data+="<a href=\""+val.fujianlianjie+"\" target='_blank' class='btn btn-xs btn-info'><i class='icon-edit bigger-120'></i></a>";
							data+="</div>";
							return data;
						}
					}];
					var scrs = $("#id").val();
					console.log("000000000000000000000000");
					console.log(scrs);
		$("#sample-table-1").loadTbl(colM,{scr:scrs},"${jpath}/yonghu/manager/findByFujian",false);
		
		
			$("#subBtn").click(function(){
				var jsonForms = getForm("#stuForm");
				$.post("${jpath}/yonghu/manager/adduser",jsonForms,function(data){
					console.log(data);
					var json = $.parseJSON(data);
					alert(json.resMsg);
				});
				$("#stuForm input").val("");
			});
		});
	</script>

	</head>

	<body style="background-color: #fff;">
<div class="page-header">
			<h1>
				控制台
				<small>
					<i class="icon-double-angle-right"></i>
					 查看
				</small>
			</h1>
		</div><!-- /.page-header -->
	<div class="row">
		<div class="col-xs-12">
			<form class="form-horizontal" id="stuForm" role="form">
				<input type="hidden" name="id" id="id" value="${yh.id}" class="col-xs-10 col-sm-5"/>
				<div class="space-4"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 姓名 </label>

					<div class="col-sm-9">
						<input type="text" name="yhxm" id="yhxm" placeholder=" 姓名 " class="col-xs-10 col-sm-5" />
					</div>
				</div>	
				<div class="space-4"></div>
				<div class="form-group">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 手机号 </label>

					<div class="col-sm-9">
						<input type="text" name="phone" id="phone" placeholder=" 手机号 " class="col-xs-10 col-sm-5" />
					</div>
				</div>	
				<div class="space-4"></div>
				<div class="form-gr0oup">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 企业名称 </label>

					<div class="col-sm-9">
						<input type="text" name="qymc" id="qymc" placeholder=" 企业名称 " class="col-xs-10 col-sm-5" />
					</div>
				</div>	
				<div class="space-4"></div>			
					<div class="form-gr0oup">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 用户附件 </label>
					<div class="col-sm-9">
					<table id="sample-table-1" class="table table-striped table-bordered table-hover">
					<thead>
						<tr>
							<th>姓名</th>
							<th>附件名称</th>
							<th>上传时间 </th>
							<th>操作</th>
						</tr>
						</thead>
						<tbody></tbody>
					</table>
					</div>
				</div>
				<div class="space-4"></div>	
				<div class="form-gr0oup">
				
				<label class="col-sm-3 control-label no-padding-right" for="form-field-3"> 用户资质文件 </label>
				<div class="col-sm-9">
				<input type="hidden" name="fujianId" id="fujianId" />
					   <div id="wrapper">
        <div id="container">
            <!--头部，相册选择和格式选择-->

            <div id="uploader">
                <div class="queueList">
                    <div id="dndArea" class="placeholder">
                        <div id="filePicker"></div>
                        <p>或将照片拖到这里，单次最多可选300张</p>
                    </div>
                </div>
                <div class="statusBar" style="display:none;">
                    <div class="progress">
                        <span class="text">0%</span>
                        <span class="percentage"></span>
                    </div><div class="info"></div>
                    <div class="btns">
                        <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                    </div>
                </div>
            </div>
        </div>
        </div>
    </div>
				</div>	
				<div class="space-4"></div>
				
				<div class="clearfix form-actions">
					<div class="col-md-offset-3 col-md-9">
						<button class="btn btn-info" id="subBtn" type="button">
							<i class="icon-ok bigger-110"></i>
							保存
						</button>

						&nbsp; &nbsp; &nbsp;
						<button class="btn" type="reset">
							<i class="icon-undo bigger-110"></i>
							还原
						</button>
					</div>
				</div>					
			</form>
		</div>
	</div>
	
  </body>
</html>
